# !/usr/bin/python
# -*- coding: UTF-8 -*-

import redis
import json

if __name__ == '__main__':
    pass
    # redis_client = redis.Redis(host='localhost', port=6379)
    # weibo_posts_path = "D:\\mark-workspace\\corpus_data\\weibo\\CommentRInteractionDataset\\Posts.json"
    # weibo_comments_path = "D:\\mark-workspace\\corpus_data\\weibo\\CommentRInteractionDataset\\Comments.json"
    # with open(weibo_posts_path, encoding="utf-8") as f:
    #     post_json_str = f.read()
    #
    # with open(weibo_comments_path, encoding="utf-8") as f:
    #     comment_json_str = f.read()
    #
    # posts_json = json.loads(post_json_str)
    # comments_json = json.loads(comment_json_str)
    # for post in posts_json:
    #     posts_mblog_id = post['mblogid']
    #     bussiness_key = "post:" + posts_mblog_id
    #     redis_value = redis_client.get(bussiness_key)
    #     if redis_value:
    #         print()
    #         continue
    #     else:
    #         redis_client.set(bussiness_key, 1)
    #     exit()
